package com.lzq.chatroom_project.common.config.redis_caffeine_config;

import java.util.concurrent.atomic.AtomicInteger;

public class TryConnectTime {
    private volatile AtomicInteger time = new AtomicInteger(0);

    public void increase() {
        time.incrementAndGet();
    }
    public void reset() {
        time.set(0);
    }
    public boolean isDegrade() {
        return time.get() > 5;
    }
}
